/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Vi
 */
@Entity
@Table(name = "employee_tests")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "EmployeeTests.findAll", query = "SELECT e FROM EmployeeTests e"),
    @NamedQuery(name = "EmployeeTests.findById", query = "SELECT e FROM EmployeeTests e WHERE e.id = :id"),
    @NamedQuery(name = "EmployeeTests.findByPunctuality", query = "SELECT e FROM EmployeeTests e WHERE e.punctuality = :punctuality"),
    @NamedQuery(name = "EmployeeTests.findByPlanning", query = "SELECT e FROM EmployeeTests e WHERE e.planning = :planning"),
    @NamedQuery(name = "EmployeeTests.findByDecisionMaking", query = "SELECT e FROM EmployeeTests e WHERE e.decisionMaking = :decisionMaking"),
    @NamedQuery(name = "EmployeeTests.findByManagementPeople", query = "SELECT e FROM EmployeeTests e WHERE e.managementPeople = :managementPeople"),
    @NamedQuery(name = "EmployeeTests.findByCommunications", query = "SELECT e FROM EmployeeTests e WHERE e.communications = :communications"),
    @NamedQuery(name = "EmployeeTests.findByCreativity", query = "SELECT e FROM EmployeeTests e WHERE e.creativity = :creativity"),
    @NamedQuery(name = "EmployeeTests.findByResistanceStress", query = "SELECT e FROM EmployeeTests e WHERE e.resistanceStress = :resistanceStress")})
public class EmployeeTests implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "punctuality")
    private Integer punctuality;
    @Column(name = "planning")
    private Integer planning;
    @Column(name = "decision_making")
    private Integer decisionMaking;
    @Column(name = "management_people")
    private Integer managementPeople;
    @Column(name = "communications")
    private Integer communications;
    @Column(name = "creativity")
    private Integer creativity;
    @Column(name = "resistance_stress")
    private Integer resistanceStress;
    @JoinColumn(name = "id_employee", referencedColumnName = "id_employee")
    @ManyToOne
    private Employee idEmployee;

    public EmployeeTests() {
    }
    
    public EmployeeTests(Integer punctuality, Integer planning, Integer decisionMaking, Integer managementPeople, Integer communications,
            Integer creativity, Integer resistanceStress, Employee Employee){
        this.punctuality = punctuality;
        this.planning = planning;
        this.decisionMaking = decisionMaking;
        this.managementPeople = managementPeople;
        this.communications = communications;
        this.creativity = creativity;
        this.resistanceStress = resistanceStress;
        this.idEmployee = Employee;
    }
    

    public EmployeeTests(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPunctuality() {
        return punctuality;
    }

    public void setPunctuality(Integer punctuality) {
        this.punctuality = punctuality;
    }

    public Integer getPlanning() {
        return planning;
    }

    public void setPlanning(Integer planning) {
        this.planning = planning;
    }

    public Integer getDecisionMaking() {
        return decisionMaking;
    }

    public void setDecisionMaking(Integer decisionMaking) {
        this.decisionMaking = decisionMaking;
    }

    public Integer getManagementPeople() {
        return managementPeople;
    }

    public void setManagementPeople(Integer managementPeople) {
        this.managementPeople = managementPeople;
    }

    public Integer getCommunications() {
        return communications;
    }

    public void setCommunications(Integer communications) {
        this.communications = communications;
    }

    public Integer getCreativity() {
        return creativity;
    }

    public void setCreativity(Integer creativity) {
        this.creativity = creativity;
    }

    public Integer getResistanceStress() {
        return resistanceStress;
    }

    public void setResistanceStress(Integer resistanceStress) {
        this.resistanceStress = resistanceStress;
    }

    public Employee getIdEmployee() {
        return idEmployee;
    }

    public void setIdEmployee(Employee idEmployee) {
        this.idEmployee = idEmployee;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EmployeeTests)) {
            return false;
        }
        EmployeeTests other = (EmployeeTests) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "EmployeeTests{" + "id=" + id + ", punctuality=" + punctuality + ", planning=" + planning + ", decisionMaking=" + decisionMaking + ", managementPeople=" + managementPeople + ", communications=" + communications + ", creativity=" + creativity + ", resistanceStress=" + resistanceStress + ", idEmployee=" + idEmployee + '}';
    }

   
    
}
